﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">

    <Style x:Key="AccordionItemStyle" TargetType="toolkit:AccordionItem">
        <Setter Property="IsSelected" Value="True" />
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="../../Images/rbgbbg.png" />
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="BorderThickness" Value="0 0 0 0" />
    </Style>

    <Style x:Key="AccordionListBoxStyle" TargetType="ListBox">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="#F6F8FA" />

    </Style>

    <Style x:Key="AccordionStyle" TargetType="toolkit:Accordion" >
        <Setter Property="SelectionMode" Value="ZeroOrMore" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource AccordionItemStyle}" />
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="BorderThickness" Value="0 0 0 0" />
    </Style>

    <Style x:Key="AccordionHeaderStyle" TargetType="TextBlock" >
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Height" Value="25" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontFamily" Value="Verdana" />
    </Style>

    <Style x:Key="GridHeaderTextBlockStyle" TargetType="TextBlock">
        <Setter Property="Margin" Value="10 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="TextTrimming" Value="WordEllipsis" />
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="FontSize" Value="11" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style x:Key="GridHeaderTextBlockBorderStyle" TargetType="Border">
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="BorderThickness" Value="1 0 1 0" />
        <Setter Property="BorderBrush" Value="#a5acb5" />
    </Style>

    <Style x:Key="GridTextBlockStyle" TargetType="TextBlock">
        <Setter Property="Margin" Value="10 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="TextTrimming" Value="WordEllipsis" />
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style x:Key="GridTextBlockBorderStyle" TargetType="Border">
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="BorderThickness" Value="1 0 1 0" />
        <Setter Property="BorderBrush" Value="Transparent" />
    </Style>

    <Style x:Key="GridStackPanelBorderStyle" TargetType="Border" >
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="BorderThickness" Value="0 1 0 1" />
        <Setter Property="Height" Value="21" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="BorderBrush" Value="#dbdee1" />
        <Setter Property="IsHitTestVisible" Value="True" />
    </Style>

    <Style x:Key="ListBoxStyle" TargetType="ListBox">
        <Setter Property="BorderThickness" Value="0 0 0 0" />
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
    </Style>

    <Style x:Key="ListBoxItemContainerStyle" TargetType="ListBoxItem">
        <Setter Property="Margin" Value ="0 0 0 0 " />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Border Style="{StaticResource GridStackPanelBorderStyle}">
                        <ContentPresenter />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="HeaderItemsPanelStackPanelStyle" TargetType="StackPanel">
        <Setter Property="Margin" Value="26 0 0 0" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
    </Style>

    <Style x:Key="GridHeaderBorderStyle" TargetType="Border">
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="BorderThickness" Value="0 1 0 1" />
        <Setter Property="BorderBrush" Value="#a5acb5" />
        <Setter Property="Height" Value="21" />
        <Setter Property="Background">
            <Setter.Value>
                <ImageBrush ImageSource="../../Images/GridColumnGradient.png" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ItemsPanelStackPanelStyle" TargetType="StackPanel">
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
    </Style>

    <Style x:Key="HyperlinkStyle" TargetType="HyperlinkButton">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Margin" Value="0 0 0 0" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="Foreground" Value="#000000" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HyperlinkButton">
                    <Grid Cursor="{TemplateBinding Cursor}" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UnderlineTextBlock" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="UnderlineTextBlock" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility" Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <TextBlock
                          x:Name="UnderlineTextBlock"
                          Text="{TemplateBinding Content}"
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                          Margin="{TemplateBinding Padding}"
                          TextDecorations="Underline"
                          Visibility="Collapsed"/>
                        <TextBlock Canvas.ZIndex="1"
                          x:Name="DisabledOverlay"
                          Text="{TemplateBinding Content}"
                          Foreground="#FFAAAAAA"
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                          Margin="{TemplateBinding Padding}"
                          Visibility="Collapsed"/>
                        <ContentPresenter 
                          x:Name="contentPresenter"
                          Content="{TemplateBinding Content}"
                          ContentTemplate="{TemplateBinding ContentTemplate}"
                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                          Margin="{TemplateBinding Padding}"/>
                        <Rectangle x:Name="FocusVisualElement" Stroke="#FF6DBDD1" StrokeThickness="0" Opacity="0" IsHitTestVisible="false" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="RowPictureStyle" TargetType="Image">
        <Setter Property="Width" Value="16"/>
        <Setter Property="Height" Value="16"/>
        <Setter Property="Margin" Value="10 0 0 0" />

    </Style>
</ResourceDictionary>
